Remove lisp_h_XCONS etc
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 13 Feb 2024 17:54:51 +0000 (09:54 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 13 Feb 2024 19:20:33 +0000 (11:20 -0800)
commit473dac880105cf6055a185eb3b9764243f27697c
tree919fe869c06f6d927613675a7b71905fd5787685
parent231af322b07447d87b4c250aa601219a4005d9a5
Remove lisp_h_XCONS etc

When configured with --enable-checking and compiled with gcc -O0,
these macros evaluated arguments multiple times, which made it too
easy to mistakenly write code that behaves differently when debugging.
This patch does not affect performance in normal builds.
In --enable-checking builds with gcc -O0 it slows down my usual
benchmark (remove all '*.elc’ files and then 'make') by 4.4%.
I hope that’s good enough; if not I can complicate the macros to
tune better for debugging builds.
* src/lisp.h (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_VAL)
(lisp_h_XCONS): Remove, moving each definiens to the corresponding
inline function.  All uses removed.
src/lisp.h